<?php
/**
 * 关于我们
 * Created by PhpStorm.
 * User: hotpot
 * Date: 2018/4/7
 * Time: 23:17
 */

namespace Admin\Controller;
use Common\Controller\AdminBaseController;

class AboutController extends AdminBaseController
{
//    public function index()
//    {
//        $this->display();
//    }

    private $db;

    public function __construct(){
        parent::__construct();
        $this->db=D('About');
    }

    // 评论列表
    public function index(){
        $data=M("About as a")->join("bjy_user as b on a.about_user=b.user_id")->select();
        $this->assign("data",$data);
        $this->display();
    }
//
//    // 通过或者取消审核
    public function change_status(){
        $about_id=I('get.about_id',0,'intval');
        $status=I('get.about_status',0,'intval');
        M('About')->where(array('about_id'=>$about_id))->setField('about_status',$status);
        $this->success('操作成功');
    }


}